Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance] No need traverse WrappedNodeRestoringNodeVisitor when no Match_ in PHPStan processNodes() #6299

Closed
wants to merge 3 commits into from

Conversation

samsonasik
Copy link
Member

Avoid unnecessary double traverse on PHPStanNodeScopeResolver when possible.

@samsonasik samsonasik changed the title [Performance] No need traverse WrappedNodeRestoringNodeVisitor when no AlwaysRememberedExpr in PHPStan processNodes() [Performance] No need traverse WrappedNodeRestoringNodeVisitor when no Match_ in PHPStan processNodes() Sep 10, 2024
@samsonasik
Copy link
Member Author

Closing for now, the different is not really significant on rector-src codebase on total time.

Before

bin/rector process --clear-cache  172.71s user 12.78s system 723% cpu 25.641 total

After

bin/rector process --clear-cache  166.45s user 10.42s system 704% cpu 25.098 total

@samsonasik samsonasik closed this Sep 10, 2024
@samsonasik samsonasik deleted the performance-always-remembered branch September 10, 2024 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant